<%@ include file="/html/init.jsp" %>

<%
	String mainTabs = ParamUtil.get(request, "mainTabs", StringPool.BLANK);

	//portletURL
	PortletURL portletURL = renderResponse.createRenderURL();
	
	List<ChucNangPhanMem> listChucNang = new ArrayList<ChucNangPhanMem>();
	if(themeDisplay.isSignedIn()){
		listChucNang = KSDLUtil.getChucNangTheoNguoiDung(themeDisplay.getUserId());	
	}
%>
<div class="header"><liferay-ui:message key="chon-chuc-nang" /></div>
<div class="navigation">
	<ul class="qlnncdk-list">
		<%
			for(ChucNangPhanMem chucNang: listChucNang){
				String maChucNang = chucNang.getMaChucNangPhanMem();
				String tenChucNang = chucNang.getTenChucNangPhanMem();
				if(maChucNang.equals(ChucNangEnum.KSDL_QLDC90.toString())){
		%>
			<li <c:if test='<%=mainTabs.equals(KSDLConstants.QUAN_LY_DAN_CU_90) || mainTabs.equals(StringPool.BLANK)%>'>class="active"</c:if> >
		  		<%
		  			portletURL.setParameter("mainTabs", KSDLConstants.QUAN_LY_DAN_CU_90);
		  		%>
		  		
		  		<a href="<%=portletURL.toString()%>" >
		  			<%=tenChucNang %>
		  		</a>
		  		
		  	</li>
		<%
				} else if(maChucNang.equals(ChucNangEnum.KSDL_IDC90.toString())){
		%>
			<li <c:if test='<%=mainTabs.equals(KSDLConstants.IMPORT_DAN_CU_90) %>'>class="active"</c:if> >
		  		<%
	  				portletURL.setParameter("mainTabs", KSDLConstants.IMPORT_DAN_CU_90);
		  		%>
		  		
		  		<a href="<%=portletURL.toString()%>" >
		  			<%=tenChucNang %>
		  		</a>
		  	</li>
		<%		
				} else if(maChucNang.equals(ChucNangEnum.KSDL_KTDLDC90.toString())){
		%>
			<li <c:if test='<%=mainTabs.equals(KSDLConstants.KIEM_TRA_DU_LIEU_DC_90)%>'>class="active"</c:if> >
		  		<%
	  				portletURL.setParameter("mainTabs",  KSDLConstants.KIEM_TRA_DU_LIEU_DC_90);
		  		%>
		  		
		  		<a href="<%=portletURL.toString()%>" >
		  			<%=tenChucNang %>
		  		</a>
		  	</li>
		<%		
				} else if(maChucNang.equals(ChucNangEnum.KSDL_LBC.toString())){
		%>
			<li <c:if test='<%=mainTabs.equals(KSDLConstants.LAP_BAO_CAO) %>'>class="active"</c:if> >
		  		<%
		  			portletURL.setParameter("mainTabs",  KSDLConstants.LAP_BAO_CAO);
		  		%>
		  		
		  		<a href="<%=portletURL.toString()%>" >
		  			<%=tenChucNang %>
		  		</a>
		  	</li>
	  	<%
				}
			}
		%>
	</ul>
</div>